package com.yc.mysql.mapper;

import com.yc.mysql.bean.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DemoMapper {

    // 方法名 == select id
    List<Book> selectBook();

    Book selectById(int iddddddddddddddd);

    List<Book> selectLikeName(String nameasdfasdfasdf);

    // 多参数情况下, 必须给每个参数命名
    int updateNameById(@Param("name") String adfasdf,
                       @Param("id") int iasdfasdfd);

    void insert(Book book);

    int deleteById(int id);

}
